<!--_meta 作为公共模版分离出去-->
<include file='public/_meta'>
<!--/meta 作为公共模版分离出去-->
<title>综合管理平台 - joyincar v1.0</title>
<meta name="keywords" content="共享汽车,共享,新能源汽车,新能源,汽车,租车">
<meta name="description" content="响响租车是一个会员制的新能源汽车租赁平台，致力于为企业及员工提供“省钱省事省心”的全能用车服务，全方位解决出行难问题。">
<style type="text/css">
	.ivu-notice{
		width: 450px;
		margin-right: 24px;
		position: fixed;
		z-index: 1010;
	}
	.ivu-notice-notice{
		margin-bottom: 10px;
		padding: 16px;
		box-shadow: 0 1px 6px rgba(0,0,0,.2);
		background: #fff;
		position: relative;
		overflow: hidden;
	}
	.ivu-content-custom{
		position: relative;
	}
	.ivu-notice-title{
		font-size: 14px;
	    line-height: 17px;
	    color: #17233d;
	    padding-right: 10px;
	    overflow: hidden;
	    text-overflow: ellipsis;
	    white-space: nowrap;
	}
	.ivu-notice-desc{
		font-size: 12px;
	    color: #515a6e;
	    text-align: justify;
	    line-height: 1.5;
	}
	.ivu-notice-title .ivu-notice-desc{
		font-weight: 700;
    	margin-bottom: 8px;
	}
	.ivu-notice-close{
		position: absolute;
	    right: 8px;
	    top: 5px;
	    color: #999;
	    outline: 0;
	}
	.Hui-iconfont-a{
		line-height: 32px;
	    padding-left: 26px;
	    border-bottom: none;
	    font-weight: normal;
	    color: #666;
	}
	.Hui-iconfont-a:hover{
		cursor: pointer;
	}
</style>
</head>
<body>
<!--_header 作为公共模版分离出去-->
<include file="public/_header" />
<!--/_header 作为公共模版分离出去-->

<!--_menu 作为公共模版分离出去-->
<include file="public/_menu" />
<!--/_menu 作为公共模版分离出去-->

<section class="Hui-article-box">
	<div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
		<div class="Hui-tabNav-wp">
			<ul id="min_title_list" class="acrossTab cl">
				<li class="active">
					<span title="我的桌面" data-href="welcome.html">我的桌面</span>
					<em></em></li>
		</ul>
	</div>
		<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i class="Hui-iconfont">&#xe6d7;</i></a></div>
</div>
	<div id="iframe_box" class="Hui-article">
		<div class="show_iframe">
			<div style="display:none" class="loading"></div>
			<iframe scrolling="yes" frameborder="0" src="{:url('welcome')}"></iframe>
	</div>
</div>
</section>

<div class="contextMenu" id="Huiadminmenu">
	<ul>
		<li id="closethis">关闭当前 </li>
		<li id="closeall">关闭全部 </li>
</ul>
</div>

<div class="ivu-notice" style="top:48px;right: 14px;" id="ivu-notice"></div>

<!--_footer 作为公共模版分离出去-->
<include file="public/_footer" />
<!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__PUBLIC__/lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
<script type="text/javascript">
$(function(){
	/*$("#min_title_list li").contextMenu('Huiadminmenu', {
		bindings: {
			'closethis': function(t) {
				console.log(t);
				if(t.find("i")){
					t.find("i").trigger("click");
				}		
			},
			'closeall': function(t) {
				alert('Trigger was '+t.id+'\nAction was Email');
			},
		}
	});*/


	$("body").Huitab({
		tabBar:".navbar-wrapper .navbar-levelone",
		tabCon:".Hui-aside .menu_dropdown",
		className:"current",
		index:0,
	});


});

function del_icon(obj){
	$(obj).parents(".Huialert-success").remove();
}
var websocket = null;
if('WebSocket' in window) {
    websocket = new WebSocket('wss://dyiot.joyincar.cn:8443/weSocket/C1A21A67C70CBC66F9FC3BF5B1F64D43/22');
}else {
    alert('该浏览器不支持websocket!');
}

websocket.onopen = function (event) {
    console.log('建立连接');
}

websocket.onclose = function (event) {
    console.log('连接关闭');
}

websocket.onmessage = function (event) {
	console.log(event.data);
    let result = event.data;
    let dataum = result.split('@');
    if(event.data && event.data!=='连接失败'){

	    for (let value of dataum) {
	    	if(value!==''){

	    		$("#ivu-notice").append('<div class="Huialert Huialert-success"><i class="Hui-iconfont" onclick="del_icon(this)">&#xe6a6;</i>'+value+'</div>');
	    	}
	    }
    }
    
}

websocket.onerror = function () {
    alert('websocket通信发生错误！');
}

window.onbeforeunload = function () {
    websocket.close();
}
/*个人信息*/
function myselfinfo(){
	layer.open({
		type: 1,
		area: ['300px','200px'],
		fix: false, //不固定
		maxmin: true,
		shade:0.4,
		title: '查看信息',
		content: '<div>管理员信息</div>'
	});
}

/*资讯-添加*/
function article_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*图片-添加*/
function picture_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*产品-添加*/
function product_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*用户-添加*/
function member_add(title,url,w,h){
	layer_show(title,url,w,h);
}

function down(){
	layer.open({
		type:1,
		area: ['600px','400px'],
		fix: false, //不固定
		maxmin: true,
		shade:0.4,
		title: '下载app',
		content: '<div class="text-c mt-50"><img src="https://oss.joyincar.cn/record/wxapp/RecordJoyInCar.V2.3.0.png" style="width:200px;height:200px;"/></div><div class="text-c mt-30"><p class="c-primary"> 请使用QQ扫描图中二维码或者浏览器下载 , 仅支持安卓手机</p></div>'
	});
}
function jumpTo(){
	window.open('https://manager.joyincar.cn/#/login?jwt={$jwt}');
	// window.open('http://localhost:8080/#/login?jwt={$jwt}');
}
</script> 


</body>
</html>